#include <51func.h>
void *threadFunc(void *arg){
    int *p = (int *)arg;
    printf("child, *p = %d\n", *p);
    free(p);
}
int main(int argc, char *argv[])
{
    int *p = (int *)malloc(sizeof(int));
    *p = 1000;
    pthread_t tid;
    pthread_create(&tid,NULL,threadFunc,p); // int * -> void *
    pthread_join(tid,NULL);
    //printf("main, *p = %d\n", *p);
    free(p);
    return 0;
}

